package ads;

import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

import android.util.Log;

/**
 * Rzeczy zparsowane z xmla.
 * @author Mateusz Kaflowski
 *
 */
public class homeAdHandlingXMLStuff extends DefaultHandler {

	String text = null;
	String text2 = null;
	String title = null;
	String notification = null;
	String banner = null;
	String packagename = null;
	String nicon = null;
	String bicon = null;
	String shared = null;
	String link = null;

	public void startElement(String uri, String localName, String qName,
			Attributes attributes) throws SAXException {

		text = attributes.getValue("text");
		text2 = attributes.getValue("text2");
		title = attributes.getValue("title");
		nicon = attributes.getValue("nicon");
		notification = attributes.getValue("notification");
		packagename = attributes.getValue("package");
		link = attributes.getValue("link");
	}

	public String getTitle() {
		return title;
	}
		
	public String getNicon() {
		return nicon;
	}

	public String getText() {
		return text;
	}
	
	public String getText2() {
		return text2;
	}

	public String getPackagename() {
		return packagename;
	}
	
	public String getLink(){
		return link;
	}

	public boolean getNotification() {
		if (notification.equals("true"))
			return true;
		else
			return false;
	}


}
